/**
 * Created by Administrator on 2017/3/2 0002.
 */
var Game={
    create:function () {
        var game={};
        var con=new PIXI.DisplayObjectContainer();
        con.interactive=true;
        // for(var i=0;i<5;i++)
        // {
        //     var page=Page1.create();
        //     con.addChild(page.ui);
        //     page.ui.y=i*pixiStageH;
        // }
        // Scroller.create(con,pixiStageW,pixiStageH,'ver',4);



        game.ui=con;
        var page0=Page0.create();
        var page1=Page1.create();
        page0.In();
        game.ui.addChild(page0.ui);

        document.addEventListener('Game_PageIn',pageIn);

        function pageIn(e) {
            console.log('detail:',e.detail);
            if(e.detail==1)
            {
                game.ui.addChild(page1.ui);
                page1.In();
            }
            else if(e.detail==2)
            {

            }
        }


        return game;
    }

}